mainsrc = $(wildcard src/*.c)
mainobj = $(patsubst %.c, %.o, $(mainsrc))

testsrc = $(wildcard test/*.c src/mymath.c)
testobj = $(patsubst %.c, %.o, $(testsrc))
CFLAGS += -lcmocka

CC = gcc
all: main test_suit

main: $(mainobj)
	$(CC) $(mainobj) -o $@

test_suit: $(testobj)
	$(CC) $(testobj) -o $@ $(CFLAGS)

%.o: %.c
	$(CC) -c $< -o $@




.PHONY: clean  
clean:  
	rm -rf $(mainobj) main $(testobj) test_suit